package com.totoro.domain;

import java.util.Collection;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.codehaus.jackson.annotate.JsonIgnore;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

/**
 * @generated
 */
// 教研室单位实体
@Entity
@Table(name = "department")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class Department extends BaseDomain {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer id;// 主键
	/**
	 * @generated
	 */
	@JsonIgnore
	@OneToMany(mappedBy = "department")
	private Collection<PublicReplyGroup> publicReplyGroup;// 答辩组
	/**
	 * @generated
	 */
	@JsonIgnore
	@ManyToOne
	@JoinColumn(name = "school_id")
	private School school;// 学院
	/**
	 * @generated
	 */
	@JsonIgnore
	@OneToMany(mappedBy = "department")
	private Collection<Major> major;// 专业
	/**
	 * @generated
	 */
	@JsonIgnore
	@OneToMany(mappedBy = "department")
	private Collection<Staff> staff;// 校内员工
	/**
	 * @generated
	 */
	private String no;// 编号
	/**
	 * @generated
	 */
	private String description;// 描述

	// 空构造器
	public Department() {
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Collection<PublicReplyGroup> getPublicReplyGroup() {
		return publicReplyGroup;
	}

	public void setPublicReplyGroup(
			Collection<PublicReplyGroup> publicReplyGroup) {
		this.publicReplyGroup = publicReplyGroup;
	}

	public School getSchool() {
		return school;
	}

	public void setSchool(School school) {
		this.school = school;
	}

	public Collection<Major> getMajor() {
		return major;
	}

	public void setMajor(Collection<Major> major) {
		this.major = major;
	}

	public Collection<Staff> getStaff() {
		return staff;
	}

	public void setStaff(Collection<Staff> staff) {
		this.staff = staff;
	}

	/**
	 * @generated
	 */
	public String getNo() {
		return no;
	}

	/**
	 * @param no
	 * @generated
	 */
	public void setNo(String no) {
		this.no = no;
	}

	/**
	 * @generated
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @param description
	 * @generated
	 */
	public void setDescription(String description) {
		this.description = description;
	}
}